package com.lagou.edu.controller;

import com.lagou.edu.dao.ResumeDao;
import com.lagou.edu.pojo.Resume;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/demo")
public class DeomController {

    @Autowired
    private ResumeDao resumeDao;

    @RequestMapping("all")
    @ResponseBody
    List<Resume> query(){
        List<Resume> all = resumeDao.findAll();
        return all;
    }


}
